// gcc queue_test.c ../queue.c ../cstr.c -std=c99 -g
#include "../queue.h"

int main(){

    cstr_t a1 = cstr("11.0");
    cstr_t a2 = cstr("12.0");
    cstr_t a3 = cstr("13.0");
    cstr_t a4 = cstr("14.0");

    queue_t tmp = queue();
    queue_push(&tmp, &a1);
    queue_push(&tmp, &a2);
    queue_push(&tmp, &a3);
    debug_queue(tmp);

    _print("The length of the queue : %d", queue_len(tmp));

    debug_cstr(queue_pop(&tmp));
    debug_cstr(queue_front(tmp));
    queue_push(&tmp, &a4);
    debug_queue(tmp);
    debug_cstr(queue_back(tmp));

    queue_free(&tmp);

    Fn_apply(char, free, a1.start, a2.start, a3.start, a4.start);
}